package com.chms.utility;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	public static String getFormattedDate(Date date) {
		SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
		String formattedDate = null;
		java.sql.Date dateDB = null;
		try {
			formattedDate = formatter.format(date);
			System.out.println("Formatted Date : " + formattedDate);
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
		return formattedDate;
	}

	public static void main(String... s) {
		getFormattedDate(new Date());
	}
}
